<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	java.lang.String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
.left-table .left-table-com tbody tr td,.left-table .left-table-com thead tr th{
	
	background-color: #ffffff;
	color: #000000;

}
</style>
<style>

/* 翻页样式 */
.pagination {  text-align: center; display: block; padding: 15px 0; margin: 0!important;}
.pagination ul { font-size: 0; *word-spacing:-1px/*IE6、7*/; display: inline-block; *display: inline/*IE6,7*/; margin: 0 auto!important; padding: 0; zoom:1;}
.pagination ul li { vertical-align: middle; letter-spacing: normal; word-spacing: normal; display: inline-block; width: auto!important; height: auto!important; padding:0!important; margin: 0 !important; border:none !important;}
.pagination ul li { *display: inline/*IE6,7*/; *float: left; zoom: 1;}
.pagination li span { font-size: 12px; line-height: 24px; color: #AAA; list-style-type: none; background-color: #F5F5F5; display: block; height: 24px; padding: 0px 8px; margin: 0px; border: 1px solid; border-color: #DCDCDC #DCDCDC #B8B8B8 #DCDCDC;}
.pagination li:first-child span { border-radius: 4px 0 0 4px;}
.pagination li:last-child span { border-radius: 0 4px 4px 0;}
.pagination li a span , 
.pagination li a:visited span { color: #333; text-decoration: none; cursor:pointer;}
.pagination li a:hover { text-decoration: none; }
.pagination li a:hover span, 
.pagination li a:active span{ color: #333; background-color: #E8E8E8; border-color: #D0D0D0 #D0D0D0 #AEAEAE #D0D0D0; cursor: pointer;}
.pagination li span.currentpage { color: #FFF; font-weight: bold;  background-color: #41BEDD; border-color: #3AABC6 #3AABC6 #318EA6 #3AABC6; border-radius: 0;}
</style>
</head>
<body>

<div class="research-project">
					<%-- <form  method="post" id="myform" name="myform" enctype="multipart/form-data" action="<%=path%>/scientific/downloadExcel.do">
					<div class="upload-download">
						<img src="<%=path%>/image/leandri.png" alt="" class="img-icon" >
							<input  id="excelFile1"  type="file"  name="excelFile">
							<input value="提交" type="submit">
						
							<img src="<%=path%>/image/download.png" alt="" class="btn-download">
						
						<label for="excelFile1">
						<img src="<%=path%>/image/upload.png" alt="" class="btn-upload" />
						</label>
					</div>
					</form> --%>
					<div class="top-title">
						人员列表
					</div>
					<%-- <form  method="post" id="myform" name="myform" enctype="multipart/form-data" action="<%=path%>/updatefl/index.do">
						<div class="search-part">
						<div class="left-input-group" style="width: 40%;">
							<div class="input-group-down">
								<label for="project-lei-zi">实验室是否为第一单位：</label>
								<select name="xmzl" id="project-lei-zi">
									<option value="">请选择</option>
									<c:forEach items="${lgzxz }"  var="v">
											<option value="${v.List_sName}" >${v.List_sName}</option>
									</c:forEach>
								</select>
							</div>
							<div class="input-group-down">
								<label for="project-lei-zi">是否为实验室课题合作文章：</label>
								<select name="xmzl" id="project-lei-zi">
									<option value="">请选择</option>
									<c:forEach items="${lgzxz }"  var="v">
											<option value="${v.List_sName}" >${v.List_sName}</option>
									</c:forEach>
								</select>
							</div>
							<div class="input-group-top">
								<label for="Update_tableName">位置：</label>
								<input type="text" name="Update_tableName" id="Update_tableName" placeholder="请输入位置信息" value="${Update_tableName} " />

							</div>
						</div>
						<div class="mid-input-group" style="width: 40%;">
							
							<div class="input-group-top">
								<label for="Update_time">时间：</label>
								<input type="date" name="Update_time" id="Update_time" value="${Update_time}" />
							</div> 
						</div>
						<!-- <div class="right-input-group">
							<div class="input-group-top">
								<label for="fuze-person">第一作者姓名：&nbsp;</label>
								<input type="text" name="scientific_principal" id="fuze-person" placeholder="请输入姓名" />

							</div>
							<div class="input-group-down">
								<label for="end-date-search">结束时间：</label>
								<input type="date" name="overtime" id="end-date-search"  />
							</div>
						</div> -->
						<div class="search-btn">
							<button id="seach-btn">查询</button>
						</div>
					</div>	
					</form> --%>
					<div class="search-content">
						<div class="left-table" style="width:100%; ">
							<table border= "1" width= "100%" class="left-table-com">
								<thead>
									<tr>
										<th width="15%">ID</th>
										<!-- <th width="10%">电话</th> -->
										<th width="15%">email</th>
										<th width="15%">姓名</th>
										<th width="15%">职务</th>
										<th width="15%">是否上传附件</th>
										<th width="25%">操作</th>
									</tr>
								</thead>
								<tbody id="c_tbody">
								<c:forEach  items="${list }" var="c" varStatus="h">
								<tr>
									<td>${ss+h.index+1 } </td>
									<!-- <td>无</td> -->
									<td>${c.user_email }</td>
									<td>${c.user_name }</td>
									<td>${c.user_identityCount }</td>
									<td>${c.zt }</td>
									<td class="center"> 
										<a href="javascript:void(0)" nc_date="${c.user_id }" class="btn-see">查看</a>
										<a href="javascript:void(0)" nc_date="${c.user_id }" class="btn-update">修改</a>
										<a href="javascript:void(0)" nc_date="${c.user_id }" class="btn-del">删除</a>
									</td>
								</tr>
								</c:forEach>
								</tbody>
							</table>
						</div>
					</div>
				<div class="pagination"></div>
				</div>
		<div style=" height:300px;"></div>
</body>
<script src="<%=path%>/back/js/defined_pagination.js"></script>
<script type="text/javascript">
		$(function(){
			/*分页*/
			eval("page = ${page}");
			eval("size = ${size}");
			eval("total = ${total}"); 
			var clickurl = "/interwar/admin/index.do?page=";
			paging($('.pagination'), page, size, total, clickurl);
			//页面样式调整js代码
			$('.content-part-left dl').click(function(){
				if($(this).find('dd').length==0){
					$(this).find('dt').addClass('removeb')
				}
				$(this).addClass('active').siblings().removeClass('active')
			})
			var oH=$('.content-part-right').height();
			$('.content-part-left').css('height',oH);
			 var trLes = $('.left-table-com tbody tr').length;
			 var listitemle = $('.list-item').length;
			for(var j=0;j<listitemle;j++){
				for(var t=0;t<trLes;t++){
					var trH=$('.left-table-com tbody tr').eq(t).outerHeight();
					$('.table-list .list-item').eq(j).find('span').eq(t+1).css({
						"height":trH,
						"line-height":(trH-14)+'px'
					})
				}
			}
			var tWL= $('.table-list .list-item').length;
			var tblW=0;
			for(var i=0;i<tWL;i++){
				tblW+=$('.table-list .list-item').eq(i).outerWidth()
			}
			$('.table-list').css('width',tblW+10);


		$('.btn-update').click(function(){
				   		var user_id=$(this).attr('nc_date');
				   		window.location.href="<%=path%>/admin/edit.do?user_id="+user_id;
				   	});
		$('.btn-see').click(function(){
	   		var user_id=$(this).attr('nc_date');
	   		window.location.href="<%=path%>/admin/show.do?user_id="+user_id;
	   	});
		$(document).on("click", ".btn-del", function(){ 
			 if (confirm('确定删除？')) {
			var _this=$(this);
	   		var update_id=$(this).attr('nc_date');
	   		$.post('<%=path%>/admin/del.do', 
	   				{'user_id':user_id},
	   				function(data){
			   			if(data.code=='0'){
			   				//console.log(_this.parent())
			   				_this.parent().parent().remove();
			   			}else{
			   				alert(data.msg);
			   			}
	   				}
	   		);
			 }
	   		//alert(1);
	   	});
	
	    /*
		// 模拟ajax数据用以下方法，方便用户更好的掌握用法
		//参数为当前页
		ajaxTest(1);
		
		function ajaxTest(num) {
			$.ajax({
				url: "table.json",
				type: "get",
				data: {},
				dataType: "json",
				success: function(data) {
					console.log(data);
					//分页
					$("#page").paging({
						pageNo: num,
						totalPage: data.totalPage,
						totalSize: data.totalSize,
						callback: function(num) {
							ajaxTest(num)
						}
					})
				}
			})
		}
		*/

		})

</script>
</html>